using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using Pronghorn.Core;
using TestDoubles;

namespace ProngHornCore_Tests
{
	[TestFixture]
	public class JsFileLocator_Tests
	{
		[Test]
		public void Given_a_file_id_and_a_context_returns_the_location_of_the_file()
		{
			string fileId = "UI.UI";
			IFileLocator fileLocator = new ConventionJsFileLocator();
			string location = fileLocator.GetFileLocation(fileId, new StubSkinFileContext());

			Assert.That(location,Is.EqualTo("../../Skins/UI/UI.js"));
		}

		[Test]
		public void Given_a_file_id_witgh_dots_and_a_context_returns_the_location_of_the_file()
		{
			string fileId = "Company.UI.UI";
			IFileLocator fileLocator = new ConventionJsFileLocator();
			string location = fileLocator.GetFileLocation(fileId, new StubSkinFileContext());

			Assert.That(location, Is.EqualTo("../../Skins/Company/UI/UI.js"));
		}
	}
}